Repository navigation
docs(skills): objectstack-ai teaches the context pack (ai_context); the record-context docs name both mounts - #37409
objectstack-fleet[bot] wants to merge 3 commits into
Conversation
…nd both doors that mount the record-context service The published skills taught only the aiContexts key name and the record-context token row. A new reference, objectstack-ai references/context-packs.md, teaches authoring a pack: its keys and bounds, a related list's where / orderBy / limit, the body and its anchors, how a pack is named (package and name, the face), what the caller is not shown, and what os validate reports. Both SKILL.md files carry a pointer paid for by deleting restatement in the same file. The aiContexts description, the service-record-context README and the RecordContextServicePlugin docblock now name both mounts: the record-context token and a plugins[] mount. Claude-Session: https://claude.ai/code/session_01Utp6CaWzgwG1QYaiBidBCK Co-authored-by: Claude <noreply@anthropic.com>
… page; the pack example names declared fields only Claude-Session: https://claude.ai/code/session_01Utp6CaWzgwG1QYaiBidBCK Co-authored-by: Claude <noreply@anthropic.com>
…pay for the pointer with the prefix restatement instead Claude-Session: https://claude.ai/code/session_01Utp6CaWzgwG1QYaiBidBCK Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 176 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 1f023e762f1b84f7bfa3368284989bd045a21ec7 && git checkout 1f023e762f1b84f7bfa3368284989bd045a21ec7
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin ff6f9768d2969c4f2f42819f461424965238e30f e9b2056f9dab8ebf46b5f1de19ab1a0ffe729a0c && git checkout -B drift-repro ff6f9768d2969c4f2f42819f461424965238e30f && git merge --no-ff e9b2056f9dab8ebf46b5f1de19ab1a0ffe729a0c
node scripts/docs-audit/affected-docs.mjs --json ff6f9768d2969c4f2f42819f461424965238e30f
|
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head e9b2056 · 2026-11-26T02:53Z The seat runs the at-tier contract review of this head through an isolated sub-agent; L1 is the seat's own. |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract reviewServed-tier: PR #37409 (card #37177), 11 files, +200/−32, merge base ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
No must-fix. The teaching matches the code on Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 席位核对Head-sha:
|
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract reviewServed-tier: PR #37409 (card #37177), 11 files, +200/−32, merge base Second read, same head: only the PR body changed. It gained the block "Eval case 11, run against a model" under Tests. This record replaces the earlier one on this head. ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
No must-fix and no open should-fix. The teaching matches the code on Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 维护者速读
席位意见:ACCEPT。教学逐句对得上 main 的代码,删减的都是重复表述;唯一的 should-fix(评测未实跑)已补跑并通过。 席位核对Head-sha:
|
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Approval requested (Tier H, |
Requested by Bill · project thread
Fixes #37177
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
New reference
skills/objectstack-ai/references/context-packs.md(111 lines, 1454 tokens). It teaches authoring anai_contextpack from whatmainat9ffe37153enforces:relatedentry, with their bounds (30 fields, 3 related lists, 10 columns,limit1 to 20), and that an unknown key or a pack over a bound is refused at parse;where/orderBy/limit(feat(ai): a context pack's related list takes where / orderBy / limit (ADR-0160 row 11) #37354): the admitted operators, literal comparands only,ordernotdirection;requires: ['record-context']or apluginsmount (feat(capabilities): requires record-context mounts the record-context service, so get_record_context is served over MCP #37303), the call's four arguments, the answer's three parts;422 NAMESPACE_CONFLICT),contexttakes the faceNAMESPACE-NAME, a bare name two packages hold is refused409 RESOURCE_CONFLICT, and the/meta/ai_context/NAMEread needs?package=for such a name;os validaterules that report an author's mistake the tool keeps silent about.Pointers in the two SKILL.md files, paid by deleting restatement in the same file. Neither SKILL.md ceiling row moves.
skills/objectstack-ai/SKILL.md: a five-line "Context packs" section, aget_record_contextrow in the MCP tools table, and the frontmatter description and tags name the context pack.skills/objectstack-platform/SKILL.md: therequirestoken row says whatrecord-contextserves and links the reference; the ADR-0150 list of names "identified by package and name" gains context packs.N1 and N2 of scope note 7166997849 (prose only).
aiContexts.describe()and its TSDoc inpackages/spec/src/stack.zod.tsno longer read the token as the only serving condition. They name both mounts: the CLI mounts the service whererequiresincludesrecord-context, and a host that composes its own kernel listsRecordContextServicePlugininplugins. Regenerated mirror:content/docs/references/api/package-api-assembled.mdx.packages/services/service-record-context/README.mdand theRecordContextServicePlugindocblock teach the token beside theplugins[]mount.@objectstack/specand@objectstack/service-record-context.Eval case 11 in
skills/objectstack-ai/evals/skills-tools-knowledge.json: the card's prompt ("give the AI a customer's open opportunities and notes").One new ratchet row in
scripts/check-skills-token-ratchet.mjsfor the new reference, pinned at the measurement (5813 bytes,ceil(5813 / 4) = 1454, zero headroom). It is the seat's claim amendment 2 on the card, comment 7179788843: "one new row in check-skills-token-ratchet.mjs for the new references/context-packs.md, pinned at the measured size".Container & model:
M,mode:thread,model: CONTRACT_REVIEW_TIER (MANDATORY for skills/**, served at tier; claim amendment 7179771295),effort: highSkills readings (base
9ffe37153, heade9b2056f)ceil(bytes / 4), the ratchet's count)skills/objectstack-ai/SKILL.mdskills/objectstack-platform/SKILL.mdskills/objectstack-ai/references/context-packs.mdskills/objectstack-ai/evals/skills-tools-knowledge.jsonSKILL.mdfiles togetherskills/treeWhat was deleted to pay for the pointers, and where each fact still lives
The discipline is the standing ruling of record 6513306068, quoted verbatim: 「A:先削重复,余额按实测提高」. Only its first half is used here: restatement is cut, and no SKILL.md row is raised.
skills/objectstack-ai/SKILL.md(+11 tokens net, inside the 14 of headroom it had):Agent → Skill → Tooldiagram. Still taught: a skill'stoolsrow ("Tool names this skill grants"), "An agent's tool set is the union of its surface-compatible skills' tools" (Platform agents), and the three captions by the Skill Configuration table, the Actions dispatch table and the Platform agents section.# or: os buildcomment line. Still taught inskills/objectstack-platform/references/operations.md("os build # the same three gates, plus emits dist/objectstack.json"), which the section points to. This home is in another file.// or 'memory' for dev/testcomment. Still taught by the Wiring paragraph above it.skills/objectstack-platform/SKILL.md(net 0):name: 'crm_account')". Still taught by the next two paragraphs (manifest.namespace: everyobject.namemust start withcrm_; "Which names carry the namespace").task.object.tsper object)". Still taught by the Naming Conventions row ({name}.{type}.ts,task.object.ts).Tests
Example validity (card What 3)
os:checkblock parsed with the builtAiContextSchema:parse success: true. Seven controls on the same pack were each refused:limit: 21, adescriptionkey, a$containsoperator, 4 related lists, 31 fields, 11 related columns,directioninorderBy.os validateon a scratch stack (objectsaccountandopportunity, the block's pack,requires: ['record-context']):Validation passed, exit 0, noai-context-*warning. Control on the same stack with awherefield the child lacks and abody.fieldthat is not long text:ai-context-field-unknownataiContexts[0].related[0].whereandai-context-body-not-long-textataiContexts[0].body.field. The scratch stack was deleted.pnpm --filter @objectstack/spec run check:skill-examples:352 prose examples type-check across 3 surface(s), exit 0.Eval case 11, graded with `gradeAnswer` (packages/qa/scenarios/src/skill-evals/grade.ts)
aiContextsentry with the relatedopportunitylist filtered bystage,body: { field: 'notes' },requires: ['record-context']):{"pass":true,"missing":[],"forbidden":[]}.aiReadable, a top-levelfilter:,direction:):{"pass":false,"missing":["opportunity","related","where","body","notes","record-context"],"forbidden":["filter:","direction:","aiReadable"]}.Eval case 11, run against a model (seat L1 item S1, record 7181297604)
One round of the repository's runner on head
e9b2056f:pnpm --filter @objectstack/scenarios skill-evals --skills objectstack-ai --concurrency 4(the runner selects by bundle, not by case, so all 11 cases ran; 22 of 22 turns, each case once with the bundle installed and once without; subscription login, no API key; the served model is in the round's run records and is not written here, repository rule).pass,missing: [],forbidden: []. The turn launchedobjectstack-aiand readobjectstack-ai/references/context-packs.md.fail,missing: ["related","where","body"],forbidden: ["filter:"]. The no-skill answer reached for a top-levelfilter:, which is the mistake the case forbids.requires: ['record-context']on the stack and says that without it nothing servesget_record_context.AiContextSchema.safeParseon this head:model answer pack parse success: true. Not measured:os validateon it (the answer names no object definitions to validate against).aiExposed; missingsigned-in session). The same round on the base text (skills/objectstack-aias of9ffe37153, 10 cases, 20 of 20 turns): 8 of 10 with the skill, and the same two cases fail (5 missingskills,aiExposed; 6 missingsigned-in session,refused). Both cases are red before this diff, on sentences this diff does not touch; they are not fixed here.Packages and gates (local, head `e9b2056f` unless a line says otherwise)
pnpm --filter @objectstack/spec test:Test Files 896 passed (896),Tests 28442 passed | 1 todo; the lock's lineVERDICT command-exit 0.pnpm --filter @objectstack/service-record-context typecheck, itstest(Test Files 2 passed,Tests 99 passed) andpnpm --filter @objectstack/spec typecheck: one locked run,VERDICT command-exit 0.pnpm --filter @objectstack/spec check:generated: 2 of 14 stale (skill docs,content/docs/references/**);--fixregenerated those two and both then checked clean.node scripts/check-skills-token-ratchet.mjs: exit 0,61 authored bundle file(s) within their ceilings; its--self-test:104 cases pass.node scripts/pm/dispatch-gates.mjs --commands): 138. Reconciliation ate9b2056f:138 derived, 137 run, and the 138th,pnpm check:pm-dispatch-gates, was run on its own afterwards: exit 0.f3cbf52a. The last commit changed onlyskills/objectstack-platform/SKILL.md, and the eleven gates that read the skills were re-run one9b2056f: all exit 0.pnpm check:skill-top-level-keysexited 1 onf3cbf52a: its self-test pins the sentence "the top level refuses it and the stack fails to load" in the platform skill, which I had cut as restatement.e9b2056frestores the sentence and pays with a different cut. Exit 0 one9b2056f.pnpm --filter @objectstack/spec run check:skill-examplesexited 3 first (PREREQUISITE NOT MET,packages/client-react/distnot built), and 0 after that package was built.node scripts/check-plugin-teardown-shape.mjs --self-test, reason: exit 3, the shallow clone cannot reach the commit its fixture is pinned to. NOT MEASURED:pnpm check:dual-build-cjs-loads, reason: exit 3, some packages have nodist/here (only the CLI and client closures were built). CI runs both.test:repoand the repo-wide lint were not run locally; they are CI's (Test Core,Lint & Repo Gates).No ablation: the diff changes documentation, one ratchet row and one eval fixture, and no behaviour a test pins.
Acceptance notes
maindoes: a host without the service serves no such tool.maindoes today: the whole call is refused403 PERMISSION_DENIED(record-context-tools.ts, step 4a). ADR-0160 D3 as amended says such a child is left out and stated. The PR that lands the amendment owes this reference one sentence.maindoes not have it: a skill'scontextkey (ADR-0160 D8;SkillSchemahas no such key, though the packnamedescription inai-context.zod.tsalready mentions it), and the total bound on long-text cells of a related list (ADR-0160 D3, amended 2026-11-25; the service bounds only the body).os validatereportedai-context-field-unknownforowner_idin a pack'sfieldson an object that does not declareowner_iditself (the platform adds it). Measured: the warning, on the scratch stack above. Not measured: whetherget_record_contextcarries the field at run time. The example avoids the field. Reported to the seat in the dev report.content/docs/ai/skills-reference.mdxis regenerated from the changed frontmatter (gen:skill-docs), not hand-edited.Verification
Two-minute check:
node scripts/check-skills-token-ratchet.mjs. Expect61 authored bundle file(s) within their ceilings, withcontext-packs.md 1454 / 1454,objectstack-ai/SKILL.md 6798 / 6801andobjectstack-platform/SKILL.md 6149 / 6149.Read first: (1)
skills/objectstack-ai/references/context-packs.mdagainstpackages/spec/src/ai/ai-context.zod.tsandpackages/services/service-record-context/src/record-context-tools.ts; the risky part is the section "What the caller is not shown". (2) The deletions listed above, in the two SKILL.md diffs. (3)packages/spec/src/stack.zod.ts, theaiContextsdescription.Generated by Claude Code